package com.example.sports_meet.athlete;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.example.sports_meet.R;

import java.util.Objects;

public class AthleteActivity extends AppCompatActivity {

    private Button aBtnSignUp;
    private Button aBtnExit;
    private Button aBtnQuery;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_athlete);
        Objects.requireNonNull(getSupportActionBar()).hide();
        init();
        aBtnSignUp.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                //跳转到报名界面
                Intent intent = new Intent(AthleteActivity.this, AthleteSignUp.class);
                //传递用户名
                //intent.putExtra("account",account);
                startActivity(intent);

            }
        });
        aBtnExit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到退赛界面
                Intent intent = new Intent(AthleteActivity.this, AthleteExitRace.class);
                //传递用户名
                // intent.putExtra("account",account);
                startActivity(intent);

            }
        });
        aBtnQuery.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到查询界面
                Intent intent = new Intent(AthleteActivity.this, AthleteQuery.class);
                //传递用户名
                // intent.putExtra("account",account);
                startActivity(intent);

            }
        });
    }

    public void init() {
        aBtnSignUp = (Button) findViewById(R.id.btn_athleteSignUp);
        aBtnExit = (Button) findViewById(R.id.btn_athleteExitRace);
        aBtnQuery = (Button) findViewById(R.id.btn_athleteRegistrationResult);
    }
}